$(document).ready(function(){

    var clickSum = 1;

    $(".loginMenu").click(function(){
        if(clickSum){
            $(".dropdown-toggle .glyphicon-menu-down").css({
                transition: 'transform 0.2s',
                transform: 'rotate(180deg)'
            });
            $(".dropdown-menu").slideDown("fast");
            clickSum--;
        }else{
            $(".dropdown-toggle .glyphicon-menu-down").css({
                transition: 'transform 0.2s',
                transform: 'rotate(0deg)'
            });
            $(".dropdown-menu").slideUp("fast");
            clickSum++;
        }
    });


    $(document).click(function(){
        if(!clickSum){
            $(".dropdown-toggle .glyphicon-menu-down").css({
                transition: 'transform 0.2s',
                transform: 'rotate(0deg)'
            });
            $(".dropdown-menu").slideUp("fast");
            clickSum++;
        }
    });

});